home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / System / ReqAttack / ReqReplacers / kernelchange.e next >
Encoding:
Text File  |  2001-02-23  |  823 b   |  17 lines

  1. /* Here's a very simple example on how to write ReqOFF requester replacers.
  2.    It calls EasyRequestArgs and after the 'Terminate' button was pressed
  3.    it sets the variable "kernel" to "WarpUP".
  4.  
  5.    IMPORTANT: To protect ReqOFF againts going into infinitive loop (when your
  6.    requester replacer calls EasyRequestArgs() with same TITLE and/or TEXT
  7.    as the original requester) you should add a single space as a first byte
  8.    of title string, or simply change it to other title which will not qualify
  9.    to be patched by your program again and again and again...
  10. */
  11.  
  12. DEF exit
  13. PROC main()
  14.   exit:=EasyRequestArgs(0,[20,0,'Kernel termination','Sure to terminate PowerUP?\nYou won\at be able to restart\nthis kernel without rebooting!','WarpUP|Cancel'],0,0)
  15.   IF exit=1;Execute('setenv kernel WarpUP',0,0);ENDIF
  16. ENDPROC exit
  17.